<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>设计模式</title>
</head>

<body>
  <h2>迭代器模式</h2>
  <script>
    Object.prototype.objFunc = function () { }
    Array.prototype.arrFunc = function () { }

    const foods = ['西兰花', '花菜', '西葫芦']

    const obj = {
      name: '西兰花炒蛋'
    }
    for (const key in obj) {
      console.log('key:', key)
    }

  </script>
</body>

</html>